<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:replace="dashboard/header :: header"></head>
<body>
	<div layout:fragment="content">
		<div class="container-fluid content-main">
			<div class="animated fadeIn">
				<div class="row">
					<!-- /.col-->
					<div class="col-sm-12">
						<div class="card">
							<div class="card-body">
					
								<form class="form-horizontal" id="addForm">
									
									<input type="hidden" name="formToken" th:value="${session.formToken}" />
									<input type="hidden" name="id" th:value="${bean.id}" />
									<input type="hidden" name="applicationId" th:value="${bean.applicationId}" />
									<input type="hidden" name="hasStatus" th:value="${bean.hasStatus}" />
									
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label" for="email-input">代码类型</label>
										<div class="col-md-9">
											<input class="form-control" id="codeTypeName" th:value="${bean.codeTypeName}" type="text" name="codeTypeName" placeholder="代码类型">
										</div>
									</div>
									
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label" for="email-input">代码值 </label>
										<div class="col-md-9">
											<input class="form-control" id="codeTypeValue" type="text" th:value="${bean.codeTypeValue}" name="codeTypeValue" placeholder="代码值">
										</div>
									</div>
									
									<!-- 
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label" for="text-input">所属应用</label>
										<div class="col-md-9">
											<input class="form-control" id="text-input" type="text" onclick="showApplication()" name="applicationIdLabel" readonly="readonly" style="cursor: pointer" placeholder="所属应用">
											<input type="hidden"  name="applicationId"  />
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label" for="email-input">使用状态</label>
										<div class="col-md-9">
											<page:dict type="common_status" name="hasStatus" />	
										</div>
									</div>
									 -->	
									
								</form>

							</div>

							<!-- 
							<div class="card-footer">
								<button class="btn btn-primary" style="float: right" onclick="save()" type="button">保存</button>
							</div>
							-->

						</div>
					</div>
					<!-- /.col-->
				</div>
			</div>
		</div>

	</div>
	
	<footer th:replace="dashboard/footer :: footer"></footer>
	<script type="text/javascript" th:src="@{/resources/js/project.js}"></script>
	
	<script type="text/javascript">

		$(function(){
			$("#addForm").validate({
				ignore: [],  
				rules: {
					applicationId: "required",
					codeTypeName: "required",
					codeTypeValue: "required"
				}
			});
		}) ;
	
		function submitHandler() {
			var result = $.validate.form("addForm");
			if(result){
				var url =  ctx+"portal/ucenter/dictionaryType/update" ;
				$.operate.save(url , $('#addForm').serialize());
			}
		}
		
	</script>
	
</body>
</html>
